package com.mini.vo;

import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

/**
 * @author zl
 * @version 1.0
 * @date Created in 2021/1/26
 */
@Data
@ToString
public class DataCommonMessage {

    private String msgType;

    private String data;


    public enum MsgType {
        user_login,
        user_dept_change,
        user_receive_limit;

        public static MsgType getMsgType(String m) {

            if (StringUtils.isBlank(m)) {
                return null;
            }

            for (MsgType mt : MsgType.values()) {
                if (mt.toString().equals(m)) {
                    return mt;
                }
            }
            return null;
        }

    }
}
